package web.protocols.action;

import com.opensymphony.xwork2.ActionSupport;
import domain.entities.*;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import services.CenterCRUDService;
import services.ProtocolCRUDService;
import services.SiteLevelDocumentsService;
import services.exceptions.NoProtocoloCompromisopaisSelectedException;

import java.util.ArrayList;
import java.util.LinkedHashMap;

/**
 * Created with IntelliJ IDEA.
 * User: nico
 * Date: 27/09/12
 * Time: 12:55
 * To change this template use File | Settings | File Templates.
 */
@Namespace("/Protocols/SiteLevelDocuments")
public class SiteLevelDocumentsController extends ActionSupport {

    private SiteLevelDocumentsService siteLevelDocumentsService;
    private ProtocolCRUDService protocolCRUDService;
    private ArrayList<String> scopes = new ArrayList<String>(0);
    private ArrayList<Centro> sites = new ArrayList<Centro>(0);
    private LinkedHashMap<Integer, String> categories = new LinkedHashMap<Integer, String>();
    private Integer categoryId;
    private Integer siteId;
    private Integer siteLevelDocumentId;

    @Autowired
    public SiteLevelDocumentsController(CenterCRUDService centerCRUDService, SiteLevelDocumentsService siteLevelDocumentsService, ProtocolCRUDService protocolCRUDService) {
        this.siteLevelDocumentsService = siteLevelDocumentsService;
        this.protocolCRUDService = protocolCRUDService;
    }

    @Action(value="main", results={
            @Result(name="success",location="/protocols.documents_site.tiles", type="tiles")
    })
    public String execute() throws NoProtocoloCompromisopaisSelectedException {
        sites = protocolCRUDService.findSitesByProtocol(protocolCRUDService.recoverProtocoloCompromisopais());
        this.initCategories();
        return SUCCESS;
    }

    //PROTOCOL INFORMATION
    private Protocolinformation protocolInformation;
    private ArrayList<Protocolinformation> listProtocolInformation = new ArrayList<Protocolinformation>(0);

    @Action(value="protocolInformationSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String protocolInformationSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveProtocolInformation(protocolInformation, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //INFORMED CONSENTS
    private Informedconsents informedConsents;
    private ArrayList<Informedconsents> listInformedConsents = new ArrayList<Informedconsents>(0);

    @Action(value="informedConsentsSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String informedConsentsSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveInformedConsents(informedConsents, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //PRINTED MATERIALS
    private Printedmaterialforpatient printedMaterials;
    private ArrayList<Printedmaterialforpatient> listPrintedMaterials = new ArrayList<Printedmaterialforpatient>(0);

    @Action(value="printedMaterialsSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String printedMaterialsSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.savePrintedMaterials(printedMaterials, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //DATA SAFETY MONITORING
    private Datasafetyreports dataSafety;
    private ArrayList<Datasafetyreports> listDataSafety = new ArrayList<Datasafetyreports>(0);

    @Action(value="dataSafetySave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String dataSafetySave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveDataSafety(dataSafety, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //REAPROBACIONES
    private Reaprobaciones reaprobaciones;
    private ArrayList<Reaprobaciones> listReaprobaciones = new ArrayList<Reaprobaciones>(0);

    @Action(value="reaprobacionesSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String reaprobacionesSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveReaprobaciones(reaprobaciones, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //CTAg
    private Ctag ctag;
    private ArrayList<Ctag> listCtags = new ArrayList<Ctag>(0);

    @Action(value="ctagSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String ctagSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveCtag(ctag, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //ADVANCED FINAL STUDY REPORTS
    private Advancedfinalstudyreports advancedfinalstudyreports;
    private ArrayList<Advancedfinalstudyreports> listAdvancedfinalstudyreports = new ArrayList<Advancedfinalstudyreports>(0);

    @Action(value="advancedfinalstudyreportsSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String advancedfinalstudyreportsSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveAdvancedfinalstudyreports(advancedfinalstudyreports, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //SEC DISCREPANCY REPORT
    private Secdiscrepancyreport secdiscrepancyreport;
    private ArrayList<Secdiscrepancyreport> listSecdiscrepancyreports = new ArrayList<Secdiscrepancyreport>(0);

    @Action(value="secdiscrepancyreportSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String secdiscrepancyreportSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveSecdiscrepancyreport(secdiscrepancyreport, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //STUDY STAFF
    private Studystaff studystaff;
    private ArrayList<Studystaff> listStudystaffs = new ArrayList<Studystaff>(0);

    @Action(value="studystaffSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String studystaffSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveStudystaff(studystaff, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //STUDY DEVIATIONS
    private Studydeviations studydeviations;
    private ArrayList<Studydeviations> listStudydeviations = new ArrayList<Studydeviations>(0);

    @Action(value="studydeviationsSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String studydeviationsSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveStudydeviations(studydeviations, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //SUPLEMENTAL CRF/CSP
    private Suplementalcrfcsp suplementalcrfcsp;
    private ArrayList<Suplementalcrfcsp> listSuplementalcrfcsps = new ArrayList<Suplementalcrfcsp>(0);

    @Action(value="suplementalcrfcspSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String suplementalcrfcspSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveSuplementalcrfcsp(suplementalcrfcsp, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //SAES
    private Saes saes;
    private ArrayList<Saes> listSaes = new ArrayList<Saes>(0);

    @Action(value="saesSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String saesSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveSaes(saes, siteId, protocolCRUDService.recoverProtocoloCompromisopais());
        return SUCCESS;
    }

    //STUDY STARTUP
    private ArrayList<Studystartup> listStudyStartup;

    @Action(value="studyStartupSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String studyStartupSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveStudystartup(protocolCRUDService.recoverProtocoloCompromisopais(), listStudyStartup, siteId);
        return SUCCESS;
    }

    //CLOSURE DOCUMENTS
    private ArrayList<Closuredocuments> listClosureDocuments;

    @Action(value="closureSave", results={
            @Result(name="success",location="changeSite", type="redirectAction", params = {"siteId", "%{siteId}"})
    })
    public String closureDocumentsSave() throws NoProtocoloCompromisopaisSelectedException {
        siteLevelDocumentsService.saveClosuredocuments(protocolCRUDService.recoverProtocoloCompromisopais(), listClosureDocuments, siteId);
        return SUCCESS;
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

    @Action(value="changeSite", results={
            @Result(name="success",location="/protocols.documents_site.tiles", type="tiles"),
            @Result(name="main",location="main", type="redirectAction"),
    })
    public String changeSite() throws NoProtocoloCompromisopaisSelectedException {
        if(siteId == -1)
            return "main";
        ProtocoloCompromisopais pcp = protocolCRUDService.recoverProtocoloCompromisopais();
        sites = protocolCRUDService.findSitesByProtocol(pcp);
        this.initCategories();
        this.findAllLists();
        checkStudyStartup(pcp, siteId);
        checkClosureDocuments(pcp, siteId);
        return SUCCESS;
    }

    private void checkClosureDocuments(ProtocoloCompromisopais pcp, Integer siteId) {
        ArrayList<Closuredocuments> list = siteLevelDocumentsService.findClosureDocumentBySiteId(siteId);
        if(list.isEmpty()){
            for(String description : Closuredocuments.getDescriptions()){
                list.add(new Closuredocuments(description));
            }
            siteLevelDocumentsService.saveClosuredocuments(pcp, list, siteId);
        }
    }

    private void checkStudyStartup(ProtocoloCompromisopais pcp, Integer siteId) {
        ArrayList<Studystartup> list = siteLevelDocumentsService.findStudyStartupBySiteId(siteId);
        if(list.isEmpty()){
            for(String description : Studystartup.getDescriptions()){
                list.add(new Studystartup(description));
            }
            siteLevelDocumentsService.saveStudystartup(pcp, list, siteId);
        }
    }

    private void findAllLists() {
        listProtocolInformation =  new ArrayList<Protocolinformation>(siteLevelDocumentsService.findProtocolInformationBySiteId(siteId));
        listInformedConsents =  new ArrayList<Informedconsents>(siteLevelDocumentsService.findInformedConsentsBySiteId(siteId));
        listPrintedMaterials = new ArrayList<Printedmaterialforpatient>(siteLevelDocumentsService.findPrintedMaterialsBySiteId(siteId));
        listDataSafety = new ArrayList<Datasafetyreports>(siteLevelDocumentsService.findDataSafetyReportsBySiteId(siteId));
        listReaprobaciones =  new ArrayList<Reaprobaciones>(siteLevelDocumentsService.findReaprobacionesBySiteId(siteId));
        listCtags = new ArrayList<Ctag>(siteLevelDocumentsService.findCtagBySiteId(siteId));
        listStudystaffs = new ArrayList<Studystaff>(siteLevelDocumentsService.findStudyStaffBySiteId(siteId));
        listStudydeviations = new ArrayList<Studydeviations>(siteLevelDocumentsService.findStudydeviationsBySiteId(siteId));
        listSuplementalcrfcsps = new ArrayList<Suplementalcrfcsp>(siteLevelDocumentsService.findSuplementalcrfcspBySiteId(siteId));
        listSaes = new ArrayList<Saes>(siteLevelDocumentsService.findSaesBySiteId(siteId));
        listAdvancedfinalstudyreports = new ArrayList<Advancedfinalstudyreports>(siteLevelDocumentsService.findAdvancedfinalstudyreportsBySiteId(siteId));
        listSecdiscrepancyreports = new ArrayList<Secdiscrepancyreport>(siteLevelDocumentsService.findSecdiscrepancyreportBySiteId(siteId));
    }

    @Action(value="changeCategory", results={
                    @Result(name="success",location="/protocols.documents_site.tiles", type="tiles"),
                    @Result(name="protocolInformation", location = "/WEB-INF/jsp/Protocols/sitedocuments/protocolinformation/ProtocolInformation.jsp"),
                    @Result(name="informedConsents", location = "/WEB-INF/jsp/Protocols/sitedocuments/informedconsents/InformedConsents.jsp"),
                    @Result(name="printedMaterials", location = "/WEB-INF/jsp/Protocols/sitedocuments/printedmaterials/PrintedMaterials.jsp"),
                    @Result(name="dataSafety", location = "/WEB-INF/jsp/Protocols/sitedocuments/datasafetymonitoring/DataSafetyMonitoring.jsp"),
                    @Result(name="reaprobaciones", location = "/WEB-INF/jsp/Protocols/sitedocuments/reaprobaciones/Reaprobaciones.jsp"),
                    @Result(name="ctag", location = "/WEB-INF/jsp/Protocols/sitedocuments/ctag/Ctag.jsp"),
                    @Result(name="studyStaff", location = "/WEB-INF/jsp/Protocols/sitedocuments/studystaff/StudyStaff.jsp"),
                    @Result(name="studyDeviations", location = "/WEB-INF/jsp/Protocols/sitedocuments/studydeviations/Studydeviations.jsp"),
                    @Result(name="suplementalCrfcsp", location = "/WEB-INF/jsp/Protocols/sitedocuments/suplementalcrfcsp/SuplementalCrfcsp.jsp"),
                    @Result(name="saes", location = "/WEB-INF/jsp/Protocols/sitedocuments/saes/Saes.jsp"),
                    @Result(name="advancedFinalStudyReports", location = "/WEB-INF/jsp/Protocols/sitedocuments/advancedfinalstudyreports/AdvancedFinalStudyReports.jsp"),
                    @Result(name="secDiscrepancyReport", location = "/WEB-INF/jsp/Protocols/sitedocuments/secdiscrepancyreport/SECDiscrepancy.jsp"),
                    @Result(name="studyStartup", location = "/WEB-INF/jsp/Protocols/sitedocuments/studystartup/StudyStartup.jsp"),
                    @Result(name="closureDocuments", location = "/WEB-INF/jsp/Protocols/sitedocuments/closure/ClosureDocuments.jsp")
})
    public String changeCategory(){
        if(categoryId != null){
            switch (categoryId.intValue()){
                case 1:
                    if(siteLevelDocumentId != null)
                        protocolInformation = siteLevelDocumentsService.getProtocolInformationById(siteLevelDocumentId);
                    return "protocolInformation";
                case 2:
                    if(siteLevelDocumentId != null)
                        informedConsents = siteLevelDocumentsService.getInformedConsentById(siteLevelDocumentId);
                    return "informedConsents";
                case 3:
                    if(siteLevelDocumentId != null)
                        printedMaterials = siteLevelDocumentsService.getPrintedMaterialById(siteLevelDocumentId);
                    return "printedMaterials";
                case 4:
                    if(siteLevelDocumentId != null)
                        dataSafety = siteLevelDocumentsService.getDataSafetyById(siteLevelDocumentId);
                    return "dataSafety";
                case 5:
                    if(siteLevelDocumentId != null)
                        reaprobaciones = siteLevelDocumentsService.getReaprobacionesById(siteLevelDocumentId);
                    return "reaprobaciones";
                case 6:
                    if(siteLevelDocumentId != null)
                        ctag = siteLevelDocumentsService.getCtagById(siteLevelDocumentId);
                    return "ctag";
                case 7:
                    if(siteLevelDocumentId != null)
                        studystaff = siteLevelDocumentsService.getStudystaffById(siteLevelDocumentId);
                    return "studyStaff";
                case 8:
                    if(siteLevelDocumentId != null)
                        studydeviations = siteLevelDocumentsService.getStudydeviationsById(siteLevelDocumentId);
                    return "studyDeviations";
                case 9:
                    if(siteLevelDocumentId != null)
                        suplementalcrfcsp = siteLevelDocumentsService.getSuplementalcrfcspById(siteLevelDocumentId);
                    return "suplementalCrfcsp";
                case 10:
                    if(siteLevelDocumentId != null)
                        saes = siteLevelDocumentsService.getSaesById(siteLevelDocumentId);
                    return "saes";
                case 11:
                    if(siteLevelDocumentId != null)
                        advancedfinalstudyreports = siteLevelDocumentsService.getAdvancedfinalstudyreportsById(siteLevelDocumentId);
                    return "advancedFinalStudyReports";
                case 12:
                    if(siteLevelDocumentId != null)
                        secdiscrepancyreport = siteLevelDocumentsService.getSecdiscrepancyreportById(siteLevelDocumentId);
                    return "secDiscrepancyReport";
                case 13:
                    listStudyStartup = siteLevelDocumentsService.findStudyStartupBySiteId(siteId);
                    return "studyStartup";
                case 14:
                    listClosureDocuments = siteLevelDocumentsService.findClosureDocumentBySiteId(siteId);
                    return "closureDocuments";
            }
        }
        return SUCCESS;
    }

    public ArrayList<Centro> getSites() {
        return sites;
    }

    public void setSites(ArrayList<Centro> sites) {
        this.sites = sites;
    }

    public ArrayList<String> getScopes() {
        return scopes;
    }

    public void setScopes(ArrayList<String> scopes) {
        this.scopes = scopes;
    }

    public LinkedHashMap<Integer, String> getCategories() {
        return categories;
    }

    public void setCategories(LinkedHashMap<Integer, String> categories) {
        this.categories = categories;
    }

    private void initCategories(){
        categories = new LinkedHashMap<Integer, String>();
        categories.put(1, "Protocol Information");
        categories.put(2, "Informed Consents");
        categories.put(3, "Printed Materials");
        categories.put(4, "Data Safety Monitoring Committee Report");
        categories.put(5, "Re-Approval");
        categories.put(6, "CTAg");
        categories.put(7, "Study Staff");
        categories.put(8, "Study Deviations");
        categories.put(9, "Supplemental CRF/CSP");
        categories.put(10, "SAEs");
        categories.put(11, "Advanced Final Reports");
        categories.put(12, "SEC/Discrepancy Report");
        categories.put(13, "Additional Startup Documents");
        categories.put(14, "Additional Closure Documents");
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public Integer getSiteId() {
        return siteId;
    }

    public void setSiteId(Integer siteId) {
        this.siteId = siteId;
    }

    public Protocolinformation getProtocolInformation() {
        return protocolInformation;
    }

    public void setProtocolInformation(Protocolinformation protocolInformation) {
        this.protocolInformation = protocolInformation;
    }

    public Informedconsents getInformedConsents() {
        return informedConsents;
    }

    public void setInformedConsents(Informedconsents informedConsents) {
        this.informedConsents = informedConsents;
    }

    public ArrayList<Protocolinformation> getListProtocolInformation() {
        return listProtocolInformation;
    }

    public void setListProtocolInformation(ArrayList<Protocolinformation> listProtocolInformation) {
        this.listProtocolInformation = listProtocolInformation;
    }

    public ArrayList<Informedconsents> getListInformedConsents() {
        return listInformedConsents;
    }

    public void setListInformedConsents(ArrayList<Informedconsents> listInformedConsents) {
        this.listInformedConsents = listInformedConsents;
    }

    public Integer getSiteLevelDocumentId() {
        return siteLevelDocumentId;
    }

    public void setSiteLevelDocumentId(Integer siteLevelDocumentId) {
        this.siteLevelDocumentId = siteLevelDocumentId;
    }

    public Printedmaterialforpatient getPrintedMaterials() {
        return printedMaterials;
    }

    public void setPrintedMaterials(Printedmaterialforpatient printedMaterials) {
        this.printedMaterials = printedMaterials;
    }

    public ArrayList<Printedmaterialforpatient> getListPrintedMaterials() {
        return listPrintedMaterials;
    }

    public void setListPrintedMaterials(ArrayList<Printedmaterialforpatient> listPrintedMaterials) {
        this.listPrintedMaterials = listPrintedMaterials;
    }

    public Datasafetyreports getDataSafety() {
        return dataSafety;
    }

    public void setDataSafety(Datasafetyreports dataSafety) {
        this.dataSafety = dataSafety;
    }

    public ArrayList<Datasafetyreports> getListDataSafety() {
        return listDataSafety;
    }

    public void setListDataSafety(ArrayList<Datasafetyreports> listDataSafety) {
        this.listDataSafety = listDataSafety;
    }

    public Reaprobaciones getReaprobaciones() {
        return reaprobaciones;
    }

    public void setReaprobaciones(Reaprobaciones reaprobaciones) {
        this.reaprobaciones = reaprobaciones;
    }

    public ArrayList<Reaprobaciones> getListReaprobaciones() {
        return listReaprobaciones;
    }

    public void setListReaprobaciones(ArrayList<Reaprobaciones> listReaprobaciones) {
        this.listReaprobaciones = listReaprobaciones;
    }

    public void setAdvancedfinalstudyreports(Advancedfinalstudyreports advancedfinalstudyreports) {
        this.advancedfinalstudyreports = advancedfinalstudyreports;
    }

    public Advancedfinalstudyreports getAdvancedfinalstudyreports() {
        return this.advancedfinalstudyreports;
    }

    public ArrayList<Advancedfinalstudyreports> getListAdvancedfinalstudyreports() {
        return listAdvancedfinalstudyreports;
    }

    public void setListAdvancedfinalstudyreports(ArrayList<Advancedfinalstudyreports> listAdvancedfinalstudyreports) {
        this.listAdvancedfinalstudyreports = listAdvancedfinalstudyreports;
    }

    public Secdiscrepancyreport getSecdiscrepancyreport() {
        return secdiscrepancyreport;
    }

    public void setSecdiscrepancyreport(Secdiscrepancyreport secdiscrepancyreport) {
        this.secdiscrepancyreport = secdiscrepancyreport;
    }

    public ArrayList<Secdiscrepancyreport> getListSecdiscrepancyreports() {
        return listSecdiscrepancyreports;
    }

    public void setListSecdiscrepancyreports(ArrayList<Secdiscrepancyreport> listSecdiscrepancyreports) {
        this.listSecdiscrepancyreports = listSecdiscrepancyreports;
    }

    public Studystaff getStudystaff() {
        return studystaff;
    }

    public void setStudystaff(Studystaff studystaff) {
        this.studystaff = studystaff;
    }

    public ArrayList<Studystaff> getListStudystaffs() {
        return listStudystaffs;
    }

    public void setListStudystaffs(ArrayList<Studystaff> listStudystaffs) {
        this.listStudystaffs = listStudystaffs;
    }

    public void setStudydeviations(Studydeviations studydeviations) {
        this.studydeviations = studydeviations;
    }

    public Studydeviations getStudydeviations() {
        return this.studydeviations;
    }

    public ArrayList<Studydeviations> getListStudydeviations() {
        return listStudydeviations;
    }

    public void setListStudydeviations(ArrayList<Studydeviations> listStudydeviations) {
        this.listStudydeviations = listStudydeviations;
    }

    public void setSuplementalcrfcsp(Suplementalcrfcsp suplementalcrfcsp) {
        this.suplementalcrfcsp = suplementalcrfcsp;
    }

    public Suplementalcrfcsp getSuplementalcrfcsp() {
        return this.suplementalcrfcsp;
    }

    public ArrayList<Suplementalcrfcsp> getListSuplementalcrfcsps() {
        return listSuplementalcrfcsps;
    }

    public void setListSuplementalcrfcsps(ArrayList<Suplementalcrfcsp> listSuplementalcrfcsps) {
        this.listSuplementalcrfcsps = listSuplementalcrfcsps;
    }

    public void setSaes(Saes saes) {
        this.saes = saes;
    }

    public Saes getSaes() {
        return this.saes;
    }

    public ArrayList<Saes> getListSaes() {
        return listSaes;
    }

    public void setListSaes(ArrayList<Saes> listSaes) {
        this.listSaes = listSaes;
    }

    public Ctag getCtag() {
        return ctag;
    }

    public void setCtag(Ctag ctag) {
        this.ctag = ctag;
    }

    public ArrayList<Ctag> getListCtags() {
        return listCtags;
    }

    public void setListCtags(ArrayList<Ctag> listCtags) {
        this.listCtags = listCtags;
    }

    public ArrayList<Studystartup> getListStudyStartup() {
        return listStudyStartup;
    }

    public void setListStudyStartup(ArrayList<Studystartup> listStudyStartup) {
        this.listStudyStartup = listStudyStartup;
    }

    public ArrayList<Closuredocuments> getListClosureDocuments() {
        return listClosureDocuments;
    }

    public void setListClosureDocuments(ArrayList<Closuredocuments> listClosureDocuments) {
        this.listClosureDocuments = listClosureDocuments;
    }
}